package com.wenxixuanwu.fruitstore.controller;

import com.wenxixuanwu.fruitstore.entity.FruitType;
import com.wenxixuanwu.fruitstore.mapper.FruitTypeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/fruittype")
public class FruitTypeController {

    @Autowired
    private FruitTypeMapper fruitTypeMapper;

    @RequestMapping("/select")
    public List<FruitType> selectByType(){
        return fruitTypeMapper.selectByType();
    }
}
